<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template2.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditStatusDocTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" styleClass="ajustaListaMensagemErro"  layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="list"/>
            </h:panelGroup>
            <!--<h:form>-->

                <p:growl id="messages" life="3000"/>

                <p:panel>
                    <f:facet name="header">
                        <h:outputText value="#{bundle.LegendStatusDocTitle}"></h:outputText>
                    </f:facet>
                    <h:panelGrid columns="2">
                        <h:outputLabel value="#{bundle.EditStatusDocLabel_sdcId}" for="sdcId" />
                        <p:inplace id="basic" >
                            <p:inputText id="sdcId" readonly="true" value="#{statusDocController.selected.sdcId}" title="#{bundle.EditStatusDocTitle_sdcId}" />
                        </p:inplace>
                        <h:outputLabel value="#{bundle.EditStatusDocLabel_sdcNm}" for="sdcNm" />
                        <p:inputText id="sdcNm" size="70" maxlength="100" value="#{statusDocController.selected.sdcNm}" title="#{bundle.EditStatusDocTitle_sdcNm}" required="true" requiredMessage="#{bundle.EditStatusDocRequiredMessage_sdcNm}"/>
                        <h:outputLabel value="#{bundle.EditStatusDocLabel_sdcDs}" for="sdcDs" />
                        <p:inputText id="sdcDs" size="70" maxlength="255" value="#{statusDocController.selected.sdcDs}" title="#{bundle.EditStatusDocTitle_sdcDs}" />

                        <h:outputLabel value="#{bundle.createBy}" for="nomeCriador" rendered="#{not empty statusDocController.criacaoHist.nomeUsuario}"/>
                        <h:outputText id="nomeCriador" value="#{statusDocController.criacaoHist.nomeUsuario}" rendered="#{not empty statusDocController.criacaoHist.nomeUsuario}"/>
                        <h:outputLabel value="#{bundle.createDate}" for="dataCriacao" rendered="#{not empty statusDocController.criacaoHist.dataHora}"/>
                        <h:outputText id="dataCriacao" value="#{statusDocController.criacaoHist.dataHora}" rendered="#{not empty statusDocController.criacaoHist.dataHora}"/>     
                        <h:outputLabel value="#{bundle.updateBy}" for="nomeAlterador" rendered="#{not empty statusDocController.alteracaoHist.nomeUsuario}"/>
                        <h:outputText id="nomeAlterador" value="#{statusDocController.alteracaoHist.nomeUsuario}" rendered="#{not empty statusDocController.alteracaoHist.nomeUsuario}"/>
                        <h:outputLabel value="#{bundle.updateDate}" for="dataAlteracao" rendered="#{not empty statusDocController.alteracaoHist.dataHora}"/>
                        <h:outputText id="dataAlteracao" value="#{statusDocController.alteracaoHist.dataHora}" rendered="#{not empty statusDocController.alteracaoHist.dataHora}" /> 

                    </h:panelGrid>

                    <br />
                    <p:commandButton ajax="false" rendered="#{!autenticadorController.loginVisualizador}" icon="ui-icon-disk" action="#{statusDocController.update}" value="#{bundle.EditStatusDocSaveLink}"/> &nbsp;                
                    <p:commandButton ajax="false" action="#{statusDocController.prepareList}" value="#{bundle.EditStatusDocShowAllLink}" immediate="true"/>
                </p:panel>
            <!--</h:form>-->
        </ui:define>
    </ui:composition>

</html>
